#include "user.h"
uint32_t delayTime=0;
void delay_config()
{
	SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
	SysTick_Config(SystemCoreClock/1000000);
}

void SysTick_Handler()
{
	if(delayTime!=0)
		delayTime--;
}

void delay_hs(uint32_t milliSecond)
{
	delayTime=milliSecond*1000;
	while(delayTime);
}

void delay_ws(uint32_t microSecond)
{
	delayTime=microSecond;
	while(delayTime);
}
